﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Q = Qbus.Communication.Protocol.Modules;

namespace Com.Oxilly.Qsb.Core.QBusConnector.Commands
{
    class QBusToggleCommand : QbusModuleCommand<Q.Toggle>
    {
        public enum Instruction
        {
            On, Off
        }

        public Instruction instruction { get; set; }

        protected override void Executing(Q.Toggle module)
        {
            switch (instruction)
            {
                case Instruction.On:
                    module.On();
                    break;
                case Instruction.Off:
                    module.Off();
                    break;
                default:
                    break;
            }
        }
    }
}
